package org.com.yz.dal.dao.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 子商户账户信息---资金明细表
 * </p>
 *
 * @author wzc123
 * @since 2018-10-24
 */
@TableName("his_accnt_mch_sub")
public class AccountDetails extends Model<AccountDetails> {

    private static final long serialVersionUID = 1L;

    /**
     * 业务类型
     */
    @TableField("business_type")
    private String businessType;
    /**
     * 主键
     */
    @TableId(value = "id_his_accnt_mch_sub", type = IdType.AUTO)
    private Integer idHisAccntMchSub;
    /**
     * 商户号
     */
    @TableField("mch_no")
    private String mchNo;

    /**
     *子商户名称
     */
    @TableField(exist = false)
    private String mchAccntName;
    /**
     * 子商户号
     */
    @TableField("mch_accnt_no")
    private String mchAccntNo;

    /**
     * 交易流水号
     */
    @TableField("trans_no")
    private String transNo;

    /**
     * 账户类型，depository-存管户,prepay-准备金账户,prepay2-准备金账户2,onway-在途账户,onway2在途账户2,profit-分润账户,assurance-担保金账户,mchsub-子商户账户
     */
    @TableField("accnt_type")
    private String accntType;
    /**
     * 订单号
     */
    @TableField("order_no")
    private String orderNo;
    /**
     * 事务号
     */
    @TableField("transaction_no")
//    @Excel(name = "事务号",width =25)
    private String transactionNo;
    /**
     * 事件名称pay(支付)；refund(退款)； transfer( 转账 );subsidy （补贴）；fine(罚款)；consume(余额消费);award(奖励);withdraw(提现)
     */
    @TableField("event")
    private String event;

    /**
     * 子商户账户资金余额---事件发生前
     */
    @TableField("accnt_amt_before")
    private Integer accntAmtBefore;

    /**
     * 事件发生金额
     */
    @TableField("event_amt")
    private Integer eventAmt;

    /**
     * 子商户账户资金余额---事件发生后
     */
    @TableField("accnt_amt_after")
    private Integer accntAmtAfter;


    /**
     * 事件发生时间
     */
    @TableField("event_time")
    private Date eventTime;


    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 修改时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 结算周期，T1,D0,D1
     */
    @TableField("settle_duration")
    private String settleDuration;


    /**
     * 支付成功时间（支付通道返回）
     */
    @TableField("trans_time")
    private String transTime;


    //开始时间
    @TableField(exist = false)
    private String beginTime;
    //结束时间
    @TableField(exist = false)
    private String endTime;


    //group by  eventAmt(sum)
    @TableField(exist=false)
    private Integer sumAmt;

    @TableField(exist=false)
    private String remark;

    @TableField(exist=false)
    private String isHisData;

    @TableField(exist=false)
    private String rdChannel;

    /**
     * 所属支付通道
     */
    @TableField(exist=false)
    private String transChannel;
    /**
     * 退款交易流水号
     */
    @TableField(exist=false)
    private String refundTransNo;

    /**
     * 日期 YYYY-MM-DD
     */
    @Transient
    private String billDate;

    /**
     * 支付渠道
     */
    @Transient
    private String accType;

    /**
     * 渠道key
     */
    @Transient
    private String accMchId;




    public String getTransTime() {
        return transTime;
    }

    public void setTransTime(String transTime) {
        this.transTime = transTime;
    }

    public String getTransChannel() {
        return transChannel;
    }

    public void setTransChannel(String transChannel) {
        this.transChannel = transChannel;
    }

    public String getRefundTransNo() {
        return refundTransNo;
    }

    public void setRefundTransNo(String refundTransNo) {
        this.refundTransNo = refundTransNo;
    }

    public String getIsHisData() {
        return isHisData;
    }

    public void setIsHisData(String isHisData) {
        this.isHisData = isHisData;
    }

    public String getRdChannel() {
        return rdChannel;
    }

    public void setRdChannel(String rdChannel) {
        this.rdChannel = rdChannel;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getSumAmt() {
        return sumAmt;
    }

    public void setSumAmt(Integer sumAmt) {
        this.sumAmt = sumAmt;
    }

    public String getAccntType() {
        return accntType;
    }

    public void setAccntType(String accntType) {
        this.accntType = accntType;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getMchAccntName() {
        return mchAccntName;
    }

    public void setMchAccntName(String mchAccntName) {
        this.mchAccntName = mchAccntName;
    }

    public String getBusinessType() {
        return businessType;
    }

    public void setBusinessType(String businessType) {
        this.businessType = businessType;
    }

    public Integer getIdHisAccntMchSub() {
        return idHisAccntMchSub;
    }

    public void setIdHisAccntMchSub(Integer idHisAccntMchSub) {
        this.idHisAccntMchSub = idHisAccntMchSub;
    }

    public String getMchNo() {
        return mchNo;
    }

    public void setMchNo(String mchNo) {
        this.mchNo = mchNo;
    }

    public String getMchAccntNo() {
        return mchAccntNo;
    }

    public void setMchAccntNo(String mchAccntNo) {
        this.mchAccntNo = mchAccntNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getTransactionNo() {
        return transactionNo;
    }

    public void setTransactionNo(String transactionNo) {
        this.transactionNo = transactionNo;
    }

    public String getEvent() {
        return event;
    }

    public void setEvent(String event) {
        this.event = event;
    }

    public Integer getEventAmt() {
        return eventAmt;
    }

    public void setEventAmt(Integer eventAmt) {
        this.eventAmt = eventAmt;
    }

    public Date getEventTime() {
        return eventTime;
    }

    public void setEventTime(Date eventTime) {
        this.eventTime = eventTime;
    }

    public Integer getAccntAmtBefore() {
        return accntAmtBefore;
    }

    public void setAccntAmtBefore(Integer accntAmtBefore) {
        this.accntAmtBefore = accntAmtBefore;
    }

    public Integer getAccntAmtAfter() {
        return accntAmtAfter;
    }

    public void setAccntAmtAfter(Integer accntAmtAfter) {
        this.accntAmtAfter = accntAmtAfter;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getTransNo() {
        return transNo;
    }

    public void setTransNo(String transNo) {
        this.transNo = transNo;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getSettleDuration() {
        return settleDuration;
    }

    public void setSettleDuration(String settleDuration) {
        this.settleDuration = settleDuration;
    }

    public String getAccType() {
        return accType;
    }

    public void setAccType(String accType) {
        this.accType = accType;
    }

    public String getBillDate() {
        return billDate;
    }

    public void setBillDate(String billDate) {
        this.billDate = billDate;
    }

    @Override
    protected Serializable pkVal() {
        return this.idHisAccntMchSub;
    }

    public String getAccMchId() {
        return accMchId;
    }

    public void setAccMchId(String accMchId) {
        this.accMchId = accMchId;
    }

    @Override
    public String toString() {
        return "AccountDetails{" +
        "businessType=" + businessType +
        ", idHisAccntMchSub=" + idHisAccntMchSub +
        ", mchNo=" + mchNo +
        ", mchAccntNo=" + mchAccntNo +
        ", orderNo=" + orderNo +
        ", transactionNo=" + transactionNo +
        ", event=" + event +
        ", eventAmt=" + eventAmt +
        ", eventTime=" + eventTime +
        ", accntAmtBefore=" + accntAmtBefore +
        ", accntAmtAfter=" + accntAmtAfter +
        ", createTime=" + createTime +
        ", transNo=" + transNo +
        ", updateTime=" + updateTime +
        ", settleDuration=" + settleDuration +
        "}";
    }
}
